home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 1
/
Nebula One.iso
/
Utilities
/
Converters
/
Convert_FONT
/
Source
/
shared.subproj
/
RCS
/
ConvertController.h,v
< prev
next >
Wrap
Text File
|
1995-06-12
|
6KB
|
251 lines
head 1.4;
branch ;
access ;
symbols beta10:1.3;
locks death:1.4;
comment @ * @;
1.4
date 93.04.04.23.44.13; author death; state Exp;
branches ;
next 1.3;
1.3
date 93.01.10.15.07.49; author death; state Exp;
branches ;
next 1.2;
1.2
date 92.07.26.13.57.23; author death; state Exp;
branches ;
next 1.1;
1.1
date 92.07.26.13.51.28; author death; state Exp;
branches ;
next ;
desc
@Basic and primitive convert controller object.
@
1.4
log
@Sun Apr 4 23:44:13 PDT 1993
@
text
@
/* Generated by Interface Builder */
#import "ResultObject.h"
#import "common.h"
#import "ProgressIndicator.h"
// NSmajor defined in common.
#if (NSmajor == 2)
# import <appkit/defaults.h>
#else
# import <defaults/defaults.h>
#endif
@@interface ConvertController:ResultObject
{
id ProgressWindow; // Window where our progress will be displayed
id SourceFileName; // object where name of paint file being convertes is shown
id DestFileName; // object which deals with displaying the name of the EPS file
id Status; // object which deals with displaying status info (e.g. errors)
id DestPath;
id SourcePath;
id ProgressMeter;
id SourceTitle;
id SourcePathTitle;
id DestTitle;
id DestPathTitle;
id StatusTitle;
id prefPanel; // the panel which displays the preferences values for the user
id listener; // The listener instance that we use for receiving docs from wkspce
id decisionWindow;
id decisionText; // The text of why the file was judged imperfect.
id converterInst;
//
// Menus cells. So we can dim them at the right times
//
id quitCommand;
id hideCommand;
id infoCommands;
id editCommands;
id servicesCommands;
id windowsCommands;
//
// These are all enabled only when file dialogs are up. That's the only time the user
// should be wanting to modify text.
//
id cutCommand;
id pasteCommand;
id spellingCommand;
id checkSpellingCommand;
CString ConversionString;
CString SourcePrompt, DestPrompt, DestExtension, DefaultsOwner;
CString SourceExtension; // Unused at the moment
CString filePaths; // A string of files that are being dragged-and-dropped
CString AppHome;
Real lastPercent; // Stores the last percentage we had for the progress meter
Boolean cancelResult; // Indicates what decision the user made (whether to continue the conversion or cancel it
Boolean destIsDead; // An ugly hack. For when converter has closed the dest file.
}
//
// For delegate responsibilities
//
- appWillInit: sender;
- appDidInit: sender;
- appWillTerminate: sender;
- (BOOL) appAcceptsAnotherFile:sender;
- (int)app:sender openFile:(const char *)filename type:(const char *)aType;
//
// For speaker-listener delgation stuff (drag and drop)
//
- (int)iconEntered:(int)windowNum at:(double)x :(double)y
iconWindow:(int)iconWindowNum iconX:(double)iconX iconY:(double)iconY
iconWidth:(double)iconWidth iconHeight:(double)iconHeight
pathList:(char *)pathList;
- (int)iconReleasedAt:(double)x :(double)y ok:(int *)flag;
- (int)iconExitedAt:(double)x :(double)y;
#if (NSmajor == 3)
//
// For NS 3.0 drag and drop stuff
//
- (NXDragOperation)draggingEntered:(id)sender;
- (NXDragOperation)draggingUpdated:(id)sender;
- (BOOL)prepareForDragOperation:(id)sender;
- (BOOL)performDragOperation:(id)sender;
- concludeDragOperation:(id)sender;
- draggingExited:(id)sender;
#endif
//
// Utilities for the above
//
- allowDragAndDrop;
- refuseDragAndDrop;
- ProcessDroppedFiles; // behaves at much the same layer as PrepareForConversion, below.
//
// Methods to support simple converter-as-slave dialog.
//
- (int)msgQuit:(int *)flag;
- msgConvert: (char *) sourceFile To: (char*) destFile;
//
// the main guts of the class...
//
- init; // Override this in subclasses. (must open convertInst convert instance)
-free;
- displayPreferences: sender; // Override this in subclasses (if one has prefs to disply)
- (CString) GetPref: (ConstCString) thePreference;
- SetPref: (ConstCString) thePreference To: (CString) value;
- SetBoolPref: (ConstCString) thePreference To: (Boolean) value;
- (Boolean) GetBoolPref: (ConstCString) thePreference;
- SetPercentageDone: (Real) percentage;
- openDestFile: (roCString) theFile; // Override these in sub. if need to open non File files
- openSourceFile: (roCString) theFile; // Unlike others, Do NOT call [super...]
- closeSourceFile: fileInstance; // if overrode above, then override these
- closeDestFile: fileInstance andDelete: (Boolean) deleteit; // also don't [super ...]
- preConversion; // might want to subclass these (but no more likely not)
- postConversion;
- (Boolean) CheckFileOK: fileInst;
- UserDecided: sender;
- PrepareForConversion: sender;
- ConvertThisFile: (roCString) theFile;
- DoConversionFrom: sourceFile To: destinationFile;
- ConvertFrom: sourceFile To: destinationFile; // Must override
@@end
//
// Errors:
//
#define ERR_USERABORTED 10001
#define ERR_TRIEDTOOVERWRITE 10002
#define ERR_CREATEFAILED 10003
#define ERR_OPENFAILED 10004
@
1.3
log
@Sun Jan 10 15:07:49 PST 1993
@
text
@d82 1
d84 10
d111 1
@
1.2
log
@Hopefully a pretty final version (it lived through the Font contrller...
@
text
@d7 6
a12 1
#import <appkit/defaults.h>
d33 20
a52 1
d57 1
d61 1
d68 1
d89 5
d97 1
d100 1
a100 1
- SetPref: (CString) thePreference To: (CString) value;
d119 1
@
1.1
log
@Initial revision
@
text
@d24 5
a28 1
d32 4
d39 28
a66 2
- init;
- displayPreferences: sender;
d70 14
d85 2
a86 10
- ConvertThisFile: (CString) theFile;
- ConvertFrom: sourceFile To: destinationFile;
- ConvertOneFile: (CString) filename OfType: (CString) type;
- openDestFile: (CString) theFile;
- openSourceFile: (CString) theFile;
//
// For delegate responsibilities
//
- appDidInit: sender;
d94 4
a97 2
#define ERR_USERABORTED 10001
#define ERR_TRIEDTOOVERWRITE 10002
@